< previous page page_570 next page >

Page 570
0570-01.jpg
Figure 14.19.
The new error object library in action.
Type.gifListing 14.24. Creating a divide-by-zero error in code.
Private Sub Command1_Click()
    '
    On Error GoTo Localerr
    Dim rtn as Long
    '
   Print 6 / 0
    '
    Exit Sub
    '
Localerr:
   rtn = objErr.errHandler(Err, erritem, errresume, "prjTest.
arrow.gifForm1.Command1_Click")
   Resume Next
    '
End Sub
When you save and run this code, press the command button to see the new error report. You should see that the Help button is active. Press the Help button to display Visual Basic 5 help for dealing with the divide-by-zero error (see Figure 14.20).
Note.gif
Check out Appendix B for information on how you can create your own help files for your Visual Basic 5 projects.

 
< previous page page_570 next page >

If you like this book, buy it!